﻿using AutoMapper;
using ContentmanagementBase.Domain;
using ContentmanagementBaseWrite.API.Applications.Commands;
using ContentmanagementBaseWrite.API.Applications.Commands.Departments;
using ContentmanagementBaseWrite.API.Applications.Commands.Drugstores;
using ContentmanagementBaseWrite.API.Applications.Commands.Hospitals;
using ContentmanagementBaseWrite.API.Applications.Commands.Popularizations;
using ContentmanagementBaseWrite.API.Applications.Commands.Questions;


namespace ContentmanagementBaseWrite.API.AutomapperFiles
{
    /// <summary>
    /// 创建映射文件
    /// </summary>
    public class AutomapperProFiles:Profile
    {

        /// <summary>
        /// 创建映射
        /// </summary>
        public AutomapperProFiles()
        {
            //添加轮播管理映射
            CreateMap<AddNewCarouselCommand, CarouelChartModel>();
            //修改轮播管理映射
            CreateMap<UpdateCarouselCommand, CarouelChartModel>();

            //添加科室管理映射
            CreateMap<AddNewDepartmentCommand, DepartmentManagementModel>();
            //更新科室管理映射
            CreateMap<UpdateDepartmentCommand, DepartmentManagementModel>();
            //批量删除科室管理映射
            CreateMap<BatchDeleteDepartmentCommand, DepartmentManagementModel>();

            //添加医院管理映射
            CreateMap<AddNewHospitalCommand, HospitalManagementModel>();
            //更新医院管理映射
            CreateMap<UpdateHospitalCommand, HospitalManagementModel>();
            //批量删除医院管理映射
            CreateMap<BatchDeleteHospitalCommand, HospitalManagementModel>();

            //添加药店管理映射
            CreateMap<AddNewDrugstoreCommand, PharmacyManagementModel>();
            //更新药店管理映射
            CreateMap<UpdateDrugstoreCommand, PharmacyManagementModel>();
            //批量删除药店管理映射
            CreateMap<BatchDeleteDrugstoreCommand, PharmacyManagementModel>();

            //添加问题管理映射
            CreateMap<AddNewProblemCommand, ProblemManagementModel>();
            //更新问题管理映射
            CreateMap<UpdateProblemCommand, ProblemManagementModel>();

            //添加疾病科普管理映射
            CreateMap<AddNewPopularizationCommand, PopularScienceDiseaseModel>();
            //更新疾病科普管理映射
            CreateMap<UpdatePopularizationCommand, PopularScienceDiseaseModel>();
            //批量删除疾病科普管理映射
            CreateMap<BatchDeletePopularizationCommand, PopularScienceDiseaseModel>();
        }

    }
}
